//
//  AppDelegate.m
//  XTMuteOpen
//
//  Created by bushAK on 2024/1/22.
//

#import "AppDelegate.h"
#import "XTMuteOpen-Swift.h"
#import "XTCommon.h"
 


@interface AppDelegate ()


@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
 
    if([XTCommon isLogin]){
        //  跳转首页
        self.window.rootViewController = [XTVmsController new];

    }else{
        self.window.rootViewController = [XTLoginController new];

    }
    [XTCommon initWebRtc];

    [self.window makeKeyAndVisible];
    
    return YES;
}
- (void)applicationWillTerminate:(UIApplication *)application {
    [XTCommon cleanupSSL];
}

/// 切换横竖屏：返回支持方向
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
    return  UIInterfaceOrientationMaskPortrait;
}
@end
